package com.amigo.online.provider.merchant.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.amigo.online.common.core.service.IService;
import com.amigo.online.common.param.dto.merchant.EditBasicMerchantDto;
import com.amigo.online.common.param.dto.merchant.MerchantApplyDto;
import com.amigo.online.common.param.dto.merchant.MerchantAvatarDto;
import com.amigo.online.common.param.dto.merchant.MerchantEnvironmentDto;
import com.amigo.online.common.param.result.merchant.CollectGoodsInfo;
import com.amigo.online.common.param.result.merchant.MerchantConcernListInfo;
import com.amigo.online.common.param.result.merchant.MerchantDetailInfo;
import com.amigo.online.common.param.result.merchant.MerchantHomeInfo;
import com.amigo.online.provider.merchant.model.entity.Category;
import com.amigo.online.provider.merchant.model.entity.Merchant;
import com.amigo.online.provider.merchant.model.entity.MerchantAdv;

/**
 * <code>MerchantService.java</code>
 * <p>
 *
 * </p>
 * <p>
 *
 * @author LuChen
 * @version 1.0
 * @company Amigo
 * @time 2018年12月15日 下午3:33:04
 * @lastUpdate 无
 * </p>
 */
public interface MerchantService extends IService<Merchant> {

    boolean concernMerchantById(Long id);

    boolean cancelConcernMerchantById(Long id);

    MerchantConcernListInfo getConcernMerList(Integer page, Integer size);

    List<CollectGoodsInfo> getCollectMerList(Integer page, Integer size);

    List<MerchantAdv> getHomePageAdv();

    List<Category> getHomePageCategory();

    JSONObject getMerchantHome(Long merchantId, Integer page, Integer size, String language);

    Integer getConcernCount(Long merId);

    /**
     * 提交商户资料申请开通
     *
     * @return
     */
    MerchantHomeInfo applyOpenMerchant(MerchantApplyDto dto, String language);

    /**
     * 修改店铺头像
     *
     * @param dto
     * @return
     */
    boolean editMerchantAvatar(MerchantAvatarDto dto);

    /**
     * 修改店铺营业时间、服务电话、门店地址
     *
     * @return
     */
    boolean editBasicMerchant(EditBasicMerchantDto dto);

    /**
     * 新增或修改店铺环境
     *
     * @return
     */
    boolean merchantEnvironment(MerchantEnvironmentDto dto);

    /**
     * @param id
     * @return
     */
    MerchantDetailInfo getMerchantDetailInfo(Long id, String language);

    Map<String, Object> getMerchantGoods(Long merchantId, Integer status, Long categoryId, Integer page, Integer size,
                                         String language);

    /**
     * 获得热门商家
     *
     * @param label
     * @param page
     * @return
     */
    List<MerchantHomeInfo> findHotMerchant(String name, Integer page, Integer label);

    /**
     * 获得推荐商家
     *
     * @return
     */
    List<MerchantHomeInfo> findRecommendMerchant(String name, Integer page, Integer label);

    /**
     * 获得附近商家
     *
     * @param latitude
     * @param longitude
     */
    List<MerchantHomeInfo> findNearestMerchant(Integer page, Integer label, Double longitude, Double latitude, String language);

}